package com.heima.article;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.heima.article.config.ElasticSearchConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

@SuppressWarnings("ALL")
/**
 * @Description :
 * @author     :LD
 */
@SpringBootApplication(exclude = {MongoAutoConfiguration.class})
@MapperScan("com.heima.article.mapper")
@EnableDiscoveryClient //注册到nacos
@EnableFeignClients
@ServletComponentScan("com.heima.article.filter")
public class ArticleApplication {
    public static void main(String[] args) {
        SpringApplication.run(ArticleApplication.class,args);
        System.out.println("===article服务启动了===");
    }
    /**
     * mybatis-plus分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
